<template>
  <div>
    <van-list :finished="finished" finished-text="没有更多了" >
      <van-cell v-for="item in search" :key="item" :title="item" @click="showList" />
    </van-list>
  </div>
</template>
 
<script>
import {GetGoodList} from "@/request/api";
export default {
  props: ["search"],
  data() {
    return {
      finished:true
    }
  },
  methods: {
    showList() {
      GetGoodList({keyword:this.search[0]}).then((res) => {
        this.$store.commit("Search", res.data.goodsList);
        this.$emit("changeSearch")
      });
    },
  },
};
</script>
 
<style lang = "less" scoped>
</style>